

create external table jms_ods.yl_oms_order_performance_main

(

  ID                       bigint COMMENT '订单ID',

  WAYBILL_ID               string COMMENT '运单号',

  ORDER_STATUS_CODE        bigint COMMENT '订单状态',

  PHONE_CONTACT            int comment '电联标识; 1:是, 0:否',

  RECEIVER_MOBILE_PHONE    string COMMENT '收件人手机号',

  RECEIVER_TELPHONE        string COMMENT '收件人座机',

  SIGN_TIME                 TIMESTAMP COMMENT '标记时间',

  INPUT_TIME                TIMESTAMP comment '订单录入时间',

  CONTACT_BEGIN_TIME        TIMESTAMP COMMENT '电联开始时间',

  CONTACT_DURATION          bigint COMMENT '电联时长',

  DELIVERY_STAFF_NAME       string COMMENT '派件业务员',

  DELIVERY_STAFF_CODE       string COMMENT '派件业务员CODE',

  DELIVERY_NETWORK          string COMMENT '派件网点',

  DELIVERY_NETWORK_CODE     string COMMENT '派件网点CODE',

  BELONG_FRANCHISEE         string COMMENT '所属加盟商',

  BELONG_FRANCHISEE_CODE    string COMMENT '所属加盟商CODE',

  BELONG_PROXY              string COMMENT '所属代理区',

  BELONG_PROXY_CODE         string COMMENT '所属代理区CODE',

  IS_CONTACT                int COMMENT '是否电联 0:否1:是',

  ARRIVAL_TIME              TIMESTAMP COMMENT '到件时间',

  RECEIVED_TIME             TIMESTAMP COMMENT '签收时间',

  SOURCE_TYPE               int COMMENT '来源类型',

  UPDATE_TIME               TIMESTAMP COMMENT '更新时间',

  COMPLAINT_COUNT           bigint COMMENT '投诉次数',

  COMPLAINT_REASON          string COMMENT '投诉标题',

  COMPLAINT_CONTENT         string COMMENT '投诉内容',

  TAG_NAME                 string COMMENT '标签名称',

  LAST_UPDATE_TIME_SYNC     TIMESTAMP  ,

  CUSTOMER_CODE             string COMMENT '客户编号',

  CUSTOMER_NAME             string COMMENT '客户名称',

  ORIGIN_NETWORK            string COMMENT '始发网点',

  ORIGIN_PROXY_AREA         string COMMENT '始发代理区',

  ORIGIN_FRANCHISEE         string COMMENT '始发加盟商',

  RINGING_TIME              string COMMENT '振铃时长',

  CALL_STATUS               bigint COMMENT '通话状态',

  WHETHER_TO_RETURN         int COMMENT '0、否 1、是',

  DELIVERY_MANAGE_AREA      string comment '派件管理大区',

  ORIGIN_MANAGE_AREA        string comment '始发管理大区',

  ORIGIN_NETWORK_CODE       string comment '始发网点code' ,

  ORIGIN_PROXY_AREA_CODE    string comment '始发代理区code',

  ORIGIN_MANAGE_AREA_CODE   string comment '始发管理大区code' ,

  ORIGIN_FRANCHISEE_CODE    string comment '始发加盟商code',

  DELIVERY_MANAGE_AREA_CODE string comment '派件管理大区code',

  CALL_REASON               string comment '失败原因'

)

COMMENT '订单履约表'
PARTITIONED BY (
  `dt` string COMMENT '更新/创建日期 (yyyy-MM-dd)')
 stored as parquet
LOCATION
  '/dw/hive/jms_ods.db/external/yl_oms_order_performance_main'
TBLPROPERTIES (

  'parquet.column.index.access'='true'
)
